/*
 * Copyright 2010-2012 Susanta Tewari. <freecode4susant@users.sourceforge.net>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package coalescent.nb.jobs2;

import cef.command.Command;
import cef.pui.EventConstructionException;
import coalescent.cef.command.CheckPhylogenyCommand;
import coalescent.cef.command.listener.CheckPhylogenyCommandListener;
import coalescent.cef.pui.CheckPhylogenyEventImpl;
import coalescent.nb.jobs.properties.ComboPropertys_Coa;
import coalescent.nb.jobs.properties.Propertys_Coa;
import commons.nb.jobs.Job;

/**
 * @author Susanta Tewari
 * @version Nov 15, 2011
 * @since Jun 4, 2011
 */
public class CheckPhylogenyJob extends Job<CheckPhylogenyEventImpl> {

    public CheckPhylogenyJob() {

        setName("Check Phylogeny");
        setDisplayName("Check Phylogeny");
        setShortDescription("Check Phylogeny");


        // data
        addComboProperty(Propertys_Coa.of_Builder_K69Data(null));


        // algorithm
        addComboProperty(ComboPropertys_Coa.PHYLOGENY_ALGO("coalescent.builder.PhylogenyAlgo"));


        // attach listeners
        addCommandOutputListener(new CheckPhylogenyCommandListener());
    }

    @Override
    protected CheckPhylogenyEventImpl createEvent() throws EventConstructionException {
        return new CheckPhylogenyEventImpl(getProperties());
    }

    @Override
    public Class<CheckPhylogenyEventImpl> getEventImplType() {
        return CheckPhylogenyEventImpl.class;
    }

    @Override
    protected Command createCommand(final CheckPhylogenyEventImpl event) {
        return new CheckPhylogenyCommand(event);
    }    // </editor-fold>
}
